.class Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;
.super Landroid/content/BroadcastReceiver;
.source "FileExplorerActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/estrongs/android/pop/view/FileExplorerActivity;->j1()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/estrongs/android/pop/view/FileExplorerActivity;


# direct methods
.method constructor <init>(Lcom/estrongs/android/pop/view/FileExplorerActivity;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;->a:Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 4

    .line 1
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object p1

    :try_start_0
    const-string v0, "device"

    .line 2
    invoke-virtual {p2, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object p2

    check-cast p2, Landroid/hardware/usb/UsbDevice;

    if-nez p2, :cond_0

    return-void

    .line 3
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;->a:Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-virtual {v0}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->c0()Lcom/estrongs/android/pop/app/leftnavigation/h0;

    move-result-object v0

    const-string v1, "android.hardware.usb.action.USB_DEVICE_ATTACHED"

    .line 4
    invoke-virtual {v1, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    const/4 v2, 0x0

    if-eqz v1, :cond_3

    .line 5
    invoke-static {}, Lcom/estrongs/fs/impl/usb/e;->a()Z

    move-result p1

    if-eqz p1, :cond_1

    const-string p1, "FileExplorerActivity"

    const-string p2, "checkUsbMountAble=true"

    .line 6
    invoke-static {p1, p2}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    .line 7
    :cond_1
    invoke-static {}, Lcom/estrongs/fs/impl/usb/e;->f()[Lcom/estrongs/fs/impl/usb/f;

    .line 8
    invoke-static {p2}, Lcom/estrongs/fs/impl/usb/e;->a(Landroid/hardware/usb/UsbDevice;)Lcom/estrongs/fs/impl/usb/f;

    move-result-object p1

    if-eqz p1, :cond_2

    if-eqz v0, :cond_2

    .line 9
    invoke-virtual {p1}, Lcom/estrongs/fs/impl/usb/f;->e()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1}, Lcom/estrongs/fs/impl/usb/f;->c()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, p2, v1}, Lcom/estrongs/android/pop/app/leftnavigation/h0;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 10
    :cond_2
    iget-object p2, p0, Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;->a:Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-static {p2}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->y(Lcom/estrongs/android/pop/view/FileExplorerActivity;)Ljava/util/List;

    move-result-object p2

    if-eqz p2, :cond_9

    .line 11
    new-instance p2, Ljava/util/ArrayList;

    invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V

    .line 12
    invoke-virtual {p1}, Lcom/estrongs/fs/impl/usb/f;->e()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 13
    iget-object p1, p0, Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;->a:Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-static {p1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->y(Lcom/estrongs/android/pop/view/FileExplorerActivity;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_9

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Les/cy$f;

    .line 14
    invoke-interface {v0, p2, v2}, Les/cy$f;->a(Ljava/util/ArrayList;Z)V

    goto :goto_0

    :cond_3
    const-string v1, "android.hardware.usb.action.USB_DEVICE_DETACHED"

    .line 15
    invoke-virtual {v1, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_9

    .line 16
    invoke-static {p2}, Lcom/estrongs/fs/impl/usb/f;->a(Landroid/hardware/usb/UsbDevice;)Ljava/lang/String;

    move-result-object p1

    if-eqz v0, :cond_4

    .line 17
    invoke-virtual {v0, p1}, Lcom/estrongs/android/pop/app/leftnavigation/h0;->b(Ljava/lang/String;)V

    .line 18
    :cond_4
    invoke-static {}, Les/p10;->e()Les/p10;

    move-result-object p2

    invoke-virtual {p2, p1}, Les/p10;->h(Ljava/lang/String;)V

    .line 19
    iget-object p2, p0, Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;->a:Lcom/estrongs/android/pop/view/FileExplorerActivity;

    iget-object p2, p2, Lcom/estrongs/android/pop/view/FileExplorerActivity;->D:Ljava/util/List;

    const/4 v0, 0x0

    .line 20
    :goto_1
    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    if-ge v0, v1, :cond_6

    .line 21
    invoke-interface {p2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/estrongs/android/view/FileGridViewWrapper;

    if-eqz v1, :cond_5

    .line 22
    invoke-virtual {v1}, Lcom/estrongs/android/view/FileGridViewWrapper;->Y()Ljava/lang/String;

    move-result-object v3

    if-eqz v3, :cond_5

    .line 23
    invoke-virtual {v1}, Lcom/estrongs/android/view/FileGridViewWrapper;->Y()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_5

    .line 24
    iget-object p2, p0, Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;->a:Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-virtual {p2, v1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->b(Lcom/estrongs/android/view/FileGridViewWrapper;)V

    goto :goto_2

    :cond_5
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 25
    :cond_6
    :goto_2
    invoke-static {}, Lcom/estrongs/fs/impl/usb/e;->f()[Lcom/estrongs/fs/impl/usb/f;

    move-result-object p2

    if-eqz p2, :cond_7

    .line 26
    array-length p2, p2

    if-nez p2, :cond_8

    .line 27
    :cond_7
    invoke-static {v2}, Lcom/estrongs/fs/impl/usb/e;->a(Z)V

    .line 28
    :cond_8
    iget-object p2, p0, Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;->a:Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-static {p2}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->y(Lcom/estrongs/android/pop/view/FileExplorerActivity;)Ljava/util/List;

    move-result-object p2

    if-eqz p2, :cond_9

    .line 29
    new-instance p2, Ljava/util/ArrayList;

    invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V

    .line 30
    invoke-virtual {p2, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 31
    iget-object p1, p0, Lcom/estrongs/android/pop/view/FileExplorerActivity$o1;->a:Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-static {p1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->y(Lcom/estrongs/android/pop/view/FileExplorerActivity;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_3
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_9

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Les/cy$f;

    .line 32
    invoke-interface {v0, p2}, Les/cy$f;->a(Ljava/util/ArrayList;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_3

    :catch_0
    :cond_9
    return-void
.end method
